package com.jintoufs.util.ztree;

/**
 * ZTree NODE
 * 
 * @author Administrator
 * 
 */
public class TreeNode {
	
	// 节点id
	private String id;

	// 节点名称
	private String name;

	// 父节点id
	private String pId;

	// 是否展开
	private boolean open;

	// 是否选中
	private boolean checked;
	
	// 是否屏蔽 tree node 的 check box
	private boolean nocheck;
	
	// 无子节点的父节点
	private boolean isParent;
	private Object data;//自定义数据

	public TreeNode(Integer id, String orgName, Integer parentId) {
		this.id=id.toString();
		this.name=orgName;
		if(parentId==null){
			this.open=true;
		}else{
			this.pId=parentId.toString();
		}
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getPId() {
		return pId;
	}

	public void setPId(String pId) {
		this.pId = pId;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public boolean isNocheck() {
		return nocheck;
	}

	public void setNocheck(boolean nocheck) {
		this.nocheck = nocheck;
	}

	public boolean getIsParent() {
		return isParent;
	}

	public void setIsParent(boolean isParent) {
		this.isParent = isParent;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public TreeNode() {
		super();
		this.open = true;
		this.checked = false;
		this.nocheck = false;
		this.isParent = false;
	}
}
